<template>
  <ex-dialog v-model="visible" draggable title="系统接口任务信息"
	width="700" :contentHeight="450">
    <template #default>
      <el-tabs v-model="activeName"  style="height: 100%">
        <el-tab-pane label="基本信息" name="base" style="height: 100%">
          <el-descriptions class="margin-top" :column="1" border>
            <el-descriptions-item label="任务类型"><ex-label code="EXTERNAL_INTERFACE_TYPE" :value="form.taskType"></ex-label></el-descriptions-item>
            <el-descriptions-item label="状态"><ex-label code="TASK_SEND_STATUS" :value="form.status"></ex-label></el-descriptions-item>
			      <el-descriptions-item label="描述:" >{{form.description}}</el-descriptions-item>
            <el-descriptions-item label="创建时间"><ex-label format code="DATETIME" :value="form.createTime"/></el-descriptions-item>
          </el-descriptions>
        </el-tab-pane>
		  <el-tab-pane label="内容" name="request" style="height: 100%">
			  <el-descriptions class="margin-top" :column="1" border>
				  <el-descriptions-item label="发送内容">
					  <json-viewer
						  :value="form.reqData"
						  style="width: 100%; min-width: 3.125rem"
						  :expand-depth="3"
						  copyable
						  boxed
						  sort
					  />
				  </el-descriptions-item>
				  <el-descriptions-item label="响应内容"> <json-viewer
					  :value="form.resData"
					  style="width: 100%; min-width: 3.125rem"
					  :expand-depth="3"
					  copyable
					  boxed
					  sort
				  /></el-descriptions-item>
			  </el-descriptions>
		  </el-tab-pane>
      </el-tabs>
    </template>
  </ex-dialog>
</template>

<script>
import ExRelTable from "@/components/exRelTable/index.vue";
import ExLabel from "@/components/exLabel/index.vue";
import exDialog from '@/components/exDialog';

export default {
  computed: {
  },
  emits: ['success'],
  components: {
	  ExLabel,
    ExRelTable,
    exDialog
  },
  props: {
  },
  data() {
    return {
      activeName: 'base',
      visible: false,
      form: {},
    }
  },
  methods: {
    //显示
    open(entity) {
      this.form = Object.assign({}, entity);
      this.visible = true;
      this.activeName = "base";
    },
  }
}
</script>

<style scoped>
h2 {
  font-size: 17px;
  color: #3c4a54;
  padding: 0 0 30px 0;
}

[data-theme="dark"] h2 {
  color: #fff;
}

</style>
